//
//  main.m
//  hf4-7
//
//  Created by mac on 16-4-11.
//  Copyright (c) 2016年 huangfeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Atom.h"
#import "Person.h"
#import "Mouse.h"
int main(int argc, const char * argv[])
{
    
    @autoreleasepool {
        
        // insert code here...
        NSLog(@"Hello, World!");
        Atom *atom=[[Atom alloc] init];
        NSLog(@"Atom chemcal element name: %@",atom.chemicalElement);
        Person *p=[[Person alloc]init];
        p.name=@"黄锋大人";
        /* Animal *ani=p;
         [ani eat];
         [ani sleep];
         
         [p eat];
         [p sleep];
         [p talk:@"我饿了"];*/
        
        Mouse *m=[[Mouse alloc]init];
        m.name=@"米老鼠";
        NSArray *arr=@[p,m];
        for (int i=0; i<arr.count; i++) {
            Animal *ani=arr[i];
            [ani eat];
            [ani sleep];
        }
        
    }
    return 0;
}

